caret
Type
operator
Summary
Raises a number to a power.
Syntax
<number> ^ <exponent>
Description
Use the ^ operator to raise a number to a power, or to find a root of a number.
If the exponent is a fraction, with 1 as the numerator, the ^ operator finds the specified root of the number. For example, if the exponent is 1/2, the operation yields the square root of number; if the exponent is 1/4, the operation yields the 4th root of the number, and so on.
If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information.
Parameters
Name | Type | Description |
---|---|---|
number | The number and exponent are numbers, or expressions that evaluate to numbers. | |
exponent |
Examples
7^3
myNumber^(1/2)
put 2^bitDepth into numberOfColors
Related
glossary: operator, operation, math operation
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile